/**
  ******************************************************************************
  * @file    
  * @author  
  * @version 
  * @date    
  * @brief   
  ******************************************************************************
	* @attention
  *
  * <h2><center>&copy; COPYRIGHT 2012 STMicroelectronics</center></h2>
  *
  * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
  * You may not use this file except in compliance with the License.
  * You may obtain a copy of the License at:
  *
  *        http://www.st.com/software_license_agreement_liberty_v2
  *
  * Unless required by applicable law or agreed to in writing, software 
  * distributed under the License is distributed on an "AS IS" BASIS, 
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  *
  ******************************************************************************
  */
  
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __GPIO_H
#define __GPIO_H

/* Includes ------------------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
#define BUSY_GPIO_Pin                GPIO_Pin_3
#define BUSY_GPIO_Port               GPIOA

#define BUSY_Set()                   BUSY_GPIO_Port->BSRRL |= BUSY_GPIO_Pin;
#define BUSY_Reset()                 BUSY_GPIO_Port->BSRRH |= BUSY_GPIO_Pin;

#define EVENT1_GPIO_Pin              GPIO_Pin_1
#define EVENT1_GPIO_Port             GPIOA
#define EVENT1_Set()                 EVENT1_GPIO_Port->BSRRL = EVENT1_GPIO_Pin;
#define EVENT1_Reset()               EVENT1_GPIO_Port->BSRRH = EVENT1_GPIO_Pin;

#define EVENT1_OFFSET              (GPIOA_BASE - PERIPH_BASE)
#define EVENT1_PR_OFFSET           (EVENT1_OFFSET + 0x14)
#define EVENT1_BIT                  1
#define EVENT1_BB                  (PERIPH_BB_BASE + (EVENT1_PR_OFFSET * 32) + (EVENT1_BIT * 4))

#define EVENT2_GPIO_Pin              GPIO_Pin_2
#define EVENT2_GPIO_Port             GPIOA
#define EVENT2_Set()                 EVENT2_GPIO_Port->BSRRL |= EVENT2_GPIO_Pin;
#define EVENT2_Reset()               EVENT2_GPIO_Port->BSRRH |= EVENT2_GPIO_Pin;

#define WAKEUP_INPUT_GPIO_Pin        GPIO_Pin_0
#define WAKEUP_INPUT_GPIO_Port       GPIOA

/* Exported functions ------------------------------------------------------- */
void GPIO_Config(void);

#endif /* __GPIO_H */

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
